package cn.jcby.app.lebu.entity;

import cn.jcby.app.config.GeometryTypeHandler;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bedatadriven.jackson.datatype.jts.serialization.GeometryDeserializer;
import com.bedatadriven.jackson.datatype.jts.serialization.GeometrySerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 个人信息表
 * 
 * @author lht
 * @email 
 * @date 2023-12-07 15:13:35
 */
@Data
@TableName("lb_user")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserEntity extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;


	  /**
    * 
    */
    @TableId(value="id",type = IdType.ASSIGN_UUID)
    private String id;
    
    @TableField("mobile")
    private String mobile;
    @TableField("open_id")
    private String openId;

    /**
     * 头像地址
     */
    @TableField("face_url")
    private String faceUrl;
	

	   /**
     * 昵称
     */
    @TableField("nick_name")
    private String nickName;
	

	   /**
     * 性别：1男0女
     */
    @TableField("gender")
    private Integer gender;
	

	   /**
     * 出生日期
     */
    @TableField("birthday")
    private Date birthday;
	

	   /**
     * 身高:cm
     */
    @TableField("height")
    private BigDecimal height;
	

	   /**
     * 体重：kg
     */
    @TableField("weight")
    private BigDecimal weight;
	

	   /**
     * 星座:字典
     */
    @TableField("constellation")
    private String constellation;
	

	   /**
     * 职业：字典
     */
    @TableField("occupation")
    private String occupation;
	

	   /**
     * 血型：A,B,AB,O,其他
     */
    @TableField("blood")
    private String blood;
	

	   /**
     * 运动频率，字典
     */
    @TableField("motion_frequency")
    private String motionFrequency;
	

	   /**
     * 是否实名认证：1实名0未实名
     */
    @TableField("authentication")
    private Integer authentication;
	

	   /**
     * 姓名
     */
    @TableField("real_name")
    private String realName;
	

	   /**
     * 身份证号
     */
    @TableField("id_card")
    private String idCard;
	

	   /**
     * 总能量值
     */
    @TableField("energy")
    private BigDecimal energy;
	@TableField("history_total_energy")
    private BigDecimal historyTotalEnergy;

	   /**
     * 锁定能量值
     */
    @TableField("locked_energy")
    private BigDecimal lockedEnergy;
	

	   /**
     * 用户等级：默认V0
     */
    @TableField("grade")
    private Integer grade;
	

	   /**
     * 个人邀请码
     */
    @TableField("invite_code")
    private String inviteCode;
	

	   /**
     * 总里程：单位米
     */
    @TableField("total_mileage")
    private BigDecimal totalMileage;
	

	   /**
     * 运动次数
     */
    @TableField("motion_num")
    private Integer motionNum;
	

	   /**
     * 最近一次登录的经度
     */
    @TableField("longitude")
    private Double longitude;
	   /**
     * 最近一次登录的纬度
     */
    @TableField("latitude")
    private Double latitude;
	
    @TableField(value = "last_point",typeHandler = GeometryTypeHandler.class)
    @JsonSerialize(using = GeometrySerializer.class)
    @JsonDeserialize(contentUsing = GeometryDeserializer.class)
    private String lastPoint;
	   /**
     * 邀请人邀请码
     */
    @TableField("parent_invite_code")
    private String parentInviteCode;
	

	

	

	   /**
     * 是否删除：0正常1删除
     */
    @TableField("del")
    private Integer del;
	

}
